package com.bawei.remote.api;

import com.bawei.common.core.constant.ServiceNameConstants;
import com.bawei.common.core.domain.R;
import com.bawei.domain.query.DocDeleteReq;
import com.bawei.domain.request.DocInfoReq;
import com.bawei.remote.factory.RemoteEsDocFallBackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(contextId = "remoteEsDocService",value = ServiceNameConstants.ES_SERVICE,fallbackFactory = RemoteEsDocFallBackFactory.class)
public interface RemoteEsDocService {
    @PostMapping("/createDoc")
    public R createDoc(@RequestBody DocInfoReq docInfoReq);

    @DeleteMapping("/delete")
    public R delete(@RequestBody DocDeleteReq docDeleteReq);

}
